<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
    <link rel="stylesheet" type="text/css" th:href="@{{path}/front/mobile/v3/css/marketing.min.css?v={v}(path=${staticPath},v=${v})}"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInLeft">
    <div>
        <h4>
            <ol class="breadcrumb">
                <li>
                    <a class="Jump-box" data-type="1" href="javascript:void(0)" data-id="303">
                        <i class="fa fa-home"></i> <span>裂变营销</span>
                    </a>
                </li>
                <li>
                    <strong>关注公众号</strong>
                </li>
            </ol>
        </h4>
    </div>
    <div>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>分享和关注平台设置 <small>（分享平台内容设置和H5微信环境关注平台公众号设置）</small></h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-horizontal">
                            <th:block th:if="${#strings.isEmpty(wxlogin['context'])}">
                                <div class="form-group">
                                    <lable class="col-sm-1">&nbsp;</lable>
                                    <div class="col-sm-10">
                                        <div class="m-t-sm">
                                            <div class="alert alert-info" style="margin-bottom: 0;">
                                                <span class=""><i class="fa fa-warning"></i> 系统检测到，您还未配置微信公众平台相关参数，请前去</span>
                                                <a href="javascript:;" class="toConfig">配置 <i class="fa fa-angle-double-right"></i></a>
                                                <input type="hidden" id="toConfig" th:value="${wxlogin['id']}"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                            </th:block>
                            <div class="form-group" th:if="!${#lists.isEmpty(accountList)}">
                                <label class="col-sm-2 control-label">分享平台设置</label>
                                <div class="col-sm-10">
                                    <div class="checkbox i-checks">
                                        <label>
                                            <input th:id="${accountList[0]['id']}" th:checked="${accountList[0]['configStatus']}=='0'?'checked':''" type="checkbox"/>
                                            <i></i> 开启
                                        </label>
                                        <span class="ml10 c-999 fs12">（开启后移动端分享平台的内容将以自定义内容显示）</span>
                                        <a href="javascript:;"
                                           class="ml10 fs12"
                                           data-container="body"
                                           data-html="true"
                                           data-toggle="popover"
                                           data-trigger="hover"
                                           data-placement="left"
                                           th:attrappend="data-content='<img width=250 src='+${staticPath}+'/admin/v3/img/pic/shareCompExample.jpg />'">
                                            示例</a>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group shareHide" th:classappend="${accountList[0]['configStatus']}=='0'?'':'hide'">
                                <label class="col-sm-2 control-label">分享内容自定义</label>
                                <div class="col-sm-9">
                                    <section class="m-l-md m-t-sm">
                                        <div th:if="${#strings.isEmpty(accountList[0]['url'])}" class=""><i class="fa fa-info-circle c-ccc"></i> <span>还未自定义分享内容，在最右去设置</span> <i class="fa fa-hand-o-right"></i></div>
                                        <div class="media" style="vertical-align: middle">
                                            <div class="media-left">
                                                <img class="media-object img-circle" width="100" height="100" th:src="${#strings.isEmpty(accountList[0]['url'])}?'https://fimage.268xue.com/upload/0/yzl/common/2018110814/7ba20d229f3772231e31434b6d784a08.png':${accountList[0]['url']}" th:alt="${accountList[0]['title']}">
                                            </div>
                                            <div class="media-body" style="display: table-cell;vertical-align: middle">
                                                <section><span class="fs16" th:text="${accountList[0]['title']}">268教育软件</span></section>
                                                <p><span class="c-999" th:text="${accountList[0]['description']}">268教育集团成立于2013年4月，隶属于北京易知路科技有限公司。是一家专注在线教育产品研究、开发以及在线教育解决方案一站式服务的高新技术企业</span></p>
                                            </div>
                                        </div>
                                    </section>
                                </div>
                                <div class="col-sm-1 text-center">
                                    <a class="fs14 update" th:value="1">修改</a>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">H5平台地址</label>
                                <div class="col-sm-9">
                                    <section class="m-l-md m-t-sm">
                                        <span class="c-666 config-text" th:text="${mobilePath}" >http://fm.268xue.com</span>
                                        <a class="ml10 copyLink"  title="复制链接">
                                            <i class="fa fa-link"></i>
                                        </a>
                                    </section>
                                </div>
                            </div>
                            <form id="weixinform">
                                <div  class="float-e-margins">
                                    <div class="ibox-title">
                                        <h5>官方微信公众号二维码<small class="m-l-sm">微信公众号二维码</small></h5>
                                    </div>
                                    <div class="ibox-content">
                                        <div class="form-horizontal">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label text-right">H5官方公众号开关</label>
                                                <div class="col-sm-6">
                                                    <div style="margin-top: 5px">
                                                        <div class="switch">
                                                            <div class="onoffswitch">
                                                                <input name="serviceSwitch" th:checked="${sysConfig['contextTreeMap']['serviceSwitch']}=='ON'" type="checkbox" class="onoffswitch-checkbox" id="example18">
                                                                <label class="onoffswitch-label" for="example18">
                                                                    <span class="onoffswitch-inner"></span>
                                                                    <span class="onoffswitch-switch"></span>
                                                                </label>
                                                            </div>
                                                            <span>
                                                    <small class="fs12 c-999">说明：ON=开启H5个人中心官方微信公众号二维码显示</small>
                                                </span>
                                                            <span class="m-l-lg" data-container="body"
                                                                  data-html="true"
                                                                  data-toggle="popover"
                                                                  data-trigger="hover"
                                                                  data-placement="bottom"
                                                                  th:attrappend="data-content='<img width=260 src='+${staticPath}+'/admin/v3/img/pic/gfEwm-example-1.png />'">
                                                                        <span class="c-master">查看示例</span></span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label text-right"> 二维码图片</label>
                                                <div class="col-sm-9">
                                                    <p>
                                                        <button class="btn btn-primary " id="wechatServiceBtn" type="button">
                                                            <i class="fa fa-file-excel-o"></i> &nbsp;请选择图片
                                                        </button>
                                                        <span class="ml10">
                                                <small class="fs12 c-red">
                                                    <i class="fa fa-lightbulb-o"></i> 请选择二维码图片
                                                </small>
                                            </span>
                                                    </p>
                                                    <p th:class="${#maps.isEmpty(sysConfig['contextTreeMap'])}?'hide':''">
                                                        <img width="320" height="320" id="wechatService-img" th:src="${sysConfig['contextTreeMap']['url']}"/>
                                                        <input type="hidden" id="wechatServiceUrl" name="url" th:value="${sysConfig['contextTreeMap']['url']}"/>
                                                    </p>
                                                    <div class="pt10"></div>
                                                </div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-4 col-sm-offset-3">
                                        <input type="hidden" name="id" th:value="${sysConfig['id']}"/>
                                        <input type="hidden" name="configType" th:value="${sysConfig['configType']}"/>
                                        <button class="btn btn-danger" id="saveConfig" type="button">保存配置</button>
                                    </div>
                                </div>
                            </form>


                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div data-th-replace="layout/head-footer"></div>
<script th:src="@{{path}/admin/business/common/clipboard/clipboard.min.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/admin/business/netSchoolConfig/publicAccount/account-config.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/admin/business/upload/common-webuploader.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/common/summernote/summernote.min.js?v={v}(path=${staticPath},v=${v})}"></script>
</body>
<!--公众号信息设置开始-->
<th:block th:if="!${#lists.isEmpty(accountList)}" th:each="account:${accountList}">
    <textarea th:id="${account['configType']} == 'SHARE' ? 'shareId':'contentId'" class="hide">
        <div class="ibox-content m-t-lg" style="border: none">
            <div class="row">
                <form id="saveAccount">
                    <div class="col-sm-12">
                        <div class="form-horizontal">
                            <input type="hidden" name="id" th:value="${account['id']}"/>
                            <input type="hidden" name="configType" th:value="${account['configType']}"/>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" th:text="${account['configType']} == 'ACCOUNT'?'公众号名称':'分享标题'"></label>
                                <div class="col-sm-8">
                                    <input placeholder="最多不超过20个字符" type="text" name="title" class="form-control" th:value="${account['title']}">
                                </div>
                            </div>
                            <div class="form-group" th:if="${account['configType']} == 'SHARE'">
                                <label class="col-sm-2 control-label">分享描述</label>
                                <div class="col-sm-8">
                                    <section style="height: 72px" contenteditable="true" placeholder="最多不超过60个字符" id="describe" name="description" class="form-control" th:text="${account['description']}"></section>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" th:text="${account['configType']} == 'ACCOUNT'?'公众号二维码':'分享封面'"></label>
                                <div class="col-sm-8">
                                    <div class="media">
                                        <div class="media-left">
                                            <img class="media-object img-circle logo-img" alt="logo" style="width: 84px; height: 84px;" th:src="${account['url']}!=null ?${account['url']} : ${staticPath}+'/admin/v3/img/default/default-pic.jpg'">
                                            <input type="hidden" id="logoUrl" name="url" th:value="${account['url']}"/>
                                        </div>
                                        <div class="media-body" style="display: table-cell">
                                            <h4 class="media-heading">
                                                <button class="btn btn-primary" id="imgUploadBtn" type="button"><i class="fa fa-image"></i>&nbsp;选择文件</button>
                                            </h4>
                                            <span class="c-999 fs12">图片格式为：jpg\jpeg\png\gif\bmp <br />尺寸为：1:1，大小不超过1M</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="hr-line-dashed"></div>
    </textarea>
</th:block>
<!--公众号信息设置结束-->
</html>